gtk4.git
11 years agoRemove GdkGLContext::visual
Alexander Larsson [Thu, 30 Oct 2014 11:15:51 +0000 (12:15 +0100)]
Remove GdkGLContext::visual

This is not really needed. The gl context is totally tied to the
window it is created from by virtue of sharing the context with the
paint context of that window and that context always has the visual
of the window (which we already can get).

Also, all user visible contexts are essentially offscreen contexts, so
a visual doesn't make sense for them. They only use FBOs which have
whatever format that the users sets up.

11 years agoGtkGLArea: Always destroy context on unrealize
Alexander Larsson [Thu, 30 Oct 2014 11:08:31 +0000 (12:08 +0100)]
GtkGLArea: Always destroy context on unrealize

We had some code that tried to reuse the context over realize, but
that doesn't work as we need to share with the possibly new
paint context of the re-realized window.

11 years agoGdkWindow: destroy paint gl context on destroy
Alexander Larsson [Thu, 30 Oct 2014 11:07:39 +0000 (12:07 +0100)]
GdkWindow: destroy paint gl context on destroy

11 years agoGdkGLContext: Track shared context
Alexander Larsson [Thu, 30 Oct 2014 11:04:23 +0000 (12:04 +0100)]
GdkGLContext: Track shared context

This allows us to read it back, but primarily it ensures
the shared context wrapper stays alive as long as the context.

11 years agoGdkGLContext: Change the way we track the current context
Alexander Larsson [Thu, 30 Oct 2014 10:46:09 +0000 (11:46 +0100)]
GdkGLContext: Change the way we track the current context

To properly support multithreaded use we use a global GPrivate
to track the current context. Since we also don't need to track
the current context on the display we move gdk_display_destroy_gl_context
to GdkGLContext::discard.

11 years agoAdwaita: osd rationalization and tweakings
Lapo Calamandrei [Thu, 30 Oct 2014 10:50:27 +0000 (11:50 +0100)]
Adwaita: osd rationalization and tweakings

Removed bright translucent outer border for "top level" osd widgets,
insensitive osd entry styled, more meaningfull color variables and
some code rationalization.

11 years agoGdkWindowX11: Keep the impl window cairo surface around until destroy
Alexander Larsson [Thu, 30 Oct 2014 09:30:33 +0000 (10:30 +0100)]
GdkWindowX11: Keep the impl window cairo surface around until destroy

We used to have a weak ref to the cairo surface and it was keep
alive by the references in the normal windows, but that reference
was removed by d48adf9cee7e340acd7f8b9a5f9716695352b848, causing
us to constantly create and destroy the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=738648

11 years agoMake the inspector window translucent instead of lowering
Matthias Clasen [Tue, 28 Oct 2014 03:51:17 +0000 (23:51 -0400)]
Make the inspector window translucent instead of lowering

Make the inspector window click-through and see-through
when we can, instead of lowering it. This is useful, since
Wayland has no lowering.

11 years agoAdwaita: fix for the previous colorswatch fix...
Lapo Calamandrei [Wed, 29 Oct 2014 18:54:43 +0000 (19:54 +0100)]
Adwaita: fix for the previous colorswatch fix...

Make the selected colorswatch inhert on backdrop.

11 years agoAdwaita: fix selected colorswatch white border
Lapo Calamandrei [Wed, 29 Oct 2014 18:50:58 +0000 (19:50 +0100)]
Adwaita: fix selected colorswatch white border

11 years agoAdwaita: first round of OSD style converage
Lapo Calamandrei [Wed, 29 Oct 2014 17:10:39 +0000 (18:10 +0100)]
Adwaita: first round of OSD style converage

Some code refactoring, entry and spinbuttons and flat buttons
styled, more to come...

11 years agowayland: Emit GDK_OWNER_CHANGE events around wl_data_offer changes
Carlos Garnacho [Wed, 29 Oct 2014 16:31:15 +0000 (17:31 +0100)]
wayland: Emit GDK_OWNER_CHANGE events around wl_data_offer changes

This way the upper GtkClipboard code emits correctly ::owner-change when
receiving these events.

11 years agoGdkX11GLContext: Fix leak
Alexander Larsson [Wed, 29 Oct 2014 12:52:04 +0000 (13:52 +0100)]
GdkX11GLContext: Fix leak

11 years agoCache default gdk visuals in the GDK_VISUALS property on the root window
Alexander Larsson [Wed, 29 Oct 2014 12:33:08 +0000 (13:33 +0100)]
Cache default gdk visuals in the GDK_VISUALS property on the root window

This means we don't have to try to initialize opengl in every gtk
instance that is stated. It will only happen for the first one.

https://bugzilla.gnome.org/show_bug.cgi?id=738670

11 years agoX11: Pick better system and rgba visuals for GL
Alexander Larsson [Wed, 29 Oct 2014 11:35:07 +0000 (12:35 +0100)]
X11: Pick better system and rgba visuals for GL

We want to create windows with the default visuals such that we then
have the right visual for GLX when we want to create the paint GL
context for the window.

For instance, (in bug 738670) the default rgba visual we picked for the
NVidia driver had an alpha size of 0 which gave us a BadMatch when later
trying to initialize a gl context on it with a alpha FBConfig.

Instead of just picking what the Xserver likes for the default, and just
picking the first rgba visual we now actually call into GLX to pick
an appropriate visual.

11 years agoRemove a redundant call
Matthias Clasen [Wed, 29 Oct 2014 10:42:08 +0000 (06:42 -0400)]
Remove a redundant call

No need to set shapes twice in a row.

11 years agoGtkPopoverMenu: Add API to open a submenu
Matthias Clasen [Sun, 26 Oct 2014 23:14:01 +0000 (19:14 -0400)]
GtkPopoverMenu: Add API to open a submenu

This allows alternative menu switching to be implemented, besides
the builtin GtkModelButton support.

11 years agoAdd a scale to the popover menu example
Matthias Clasen [Sun, 26 Oct 2014 23:11:33 +0000 (19:11 -0400)]
Add a scale to the popover menu example

Demonsttrate that this is flexible enough for the intended uses.

11 years agoAdd documentation
Matthias Clasen [Sun, 26 Oct 2014 23:04:28 +0000 (19:04 -0400)]
Add documentation

Document GtkModelButton and GtkPopoverMenu.

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 13:08:37 +0000 (09:08 -0400)]
Adapt the testpopover example

Add the required boxes for each submenu. We now need to specify the
submenu name only once per submenu.

11 years agoGtkPopoverMenu: Simplify
Matthias Clasen [Sun, 26 Oct 2014 22:58:55 +0000 (18:58 -0400)]
GtkPopoverMenu: Simplify

Change things so each submenu is a single child, and users are
required to create the box themselves.

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 22:13:29 +0000 (18:13 -0400)]
Adapt the testpopover example

Drop all all explicit role setting from the testpopover example.

11 years agoGtkModelButton: Don't require an explicit role
Matthias Clasen [Sun, 26 Oct 2014 22:13:02 +0000 (18:13 -0400)]
GtkModelButton: Don't require an explicit role

When we have an action-name, we can deduce the role from the
action that is looked up by the action helper.

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 22:10:23 +0000 (18:10 -0400)]
Adapt the testpopover example

11 years agoGtkModelButton: Rename action-role to role
Matthias Clasen [Sun, 26 Oct 2014 22:08:26 +0000 (18:08 -0400)]
GtkModelButton: Rename action-role to role

Rename action-role to role, and make all properties readable.

11 years agoGtkModelButton: Drop unused :accel property
Matthias Clasen [Sun, 26 Oct 2014 03:30:12 +0000 (23:30 -0400)]
GtkModelButton: Drop unused :accel property

11 years agoAdapt the testpopover example
Matthias Clasen [Sun, 26 Oct 2014 20:23:50 +0000 (16:23 -0400)]
Adapt the testpopover example

Drop all uses of has-submenu.

11 years agoDrop GtkModelButton:has-submenu
Matthias Clasen [Sun, 26 Oct 2014 20:23:31 +0000 (16:23 -0400)]
Drop GtkModelButton:has-submenu

Replace the has-submenu property with checking menu-name != NULL.

11 years agoAdapt the testpopover example
Matthias Clasen [Fri, 24 Oct 2014 03:39:39 +0000 (23:39 -0400)]
Adapt the testpopover example

We now use GtkPopoverMenu, and just add the model buttons
directly to it.

11 years agoGtkModelButton: Add a menu-name property
Matthias Clasen [Fri, 24 Oct 2014 03:38:46 +0000 (23:38 -0400)]
GtkModelButton: Add a menu-name property

Add a menu-name property and use it in a default implementation
of ::clicked to switch menus if we are inside a stack. This means
GtkModelButton is no longer entirely generic, but rather expects
to be used inside a GtkPopoverMenu. It still works in other contexts
too, of course.

11 years agoAdd GtkPopoverMenu
Matthias Clasen [Fri, 24 Oct 2014 03:38:09 +0000 (23:38 -0400)]
Add GtkPopoverMenu

GtkPopoverMenu is a GtkPopover subclass that has a menu-like stack
built-in.

11 years agoAdd a manual popover menu example
Matthias Clasen [Fri, 24 Oct 2014 01:55:20 +0000 (21:55 -0400)]
Add a manual popover menu example

Reproduce the testpopover popover manually, by packing model
buttons into a stack in a popover.

11 years agoMake GtkModelButton a better GtkActionable
Matthias Clasen [Fri, 24 Oct 2014 01:43:28 +0000 (21:43 -0400)]
Make GtkModelButton a better GtkActionable

Rename the "toggled" property to "active", since that is what
GtkActionHelper expects to update for check and radio actions.
Also make the property readable, since GtkActionHelper wants
to read it.

11 years agoMake GtkModelButton public
Matthias Clasen [Fri, 24 Oct 2014 01:31:17 +0000 (21:31 -0400)]
Make GtkModelButton public

11 years agoDrop an unused variable
Matthias Clasen [Wed, 29 Oct 2014 02:36:50 +0000 (22:36 -0400)]
Drop an unused variable

11 years agoGdkGLContextX11: Don't free NULL visual info
Alexander Larsson [Wed, 29 Oct 2014 10:25:21 +0000 (11:25 +0100)]
GdkGLContextX11: Don't free NULL visual info

11 years agoFix toplevel input shape for csd windows
Matthias Clasen [Wed, 29 Oct 2014 00:23:47 +0000 (20:23 -0400)]
Fix toplevel input shape for csd windows

We need to maintain the application-set and the the csd
input shape separately, and intersect them to pass them
down.

11 years agoPlug another memory leak
Matthias Clasen [Tue, 28 Oct 2014 20:07:25 +0000 (16:07 -0400)]
Plug another memory leak

Also found by valgrind.

11 years agoPlug some memory leaks in GL support
Matthias Clasen [Tue, 28 Oct 2014 20:06:42 +0000 (16:06 -0400)]
Plug some memory leaks in GL support

valgrind pointed these out.

11 years agoGdkGlContextWayland: Don't require specific bit depths
Alexander Larsson [Tue, 28 Oct 2014 17:29:02 +0000 (18:29 +0100)]
GdkGlContextWayland: Don't require specific bit depths

This just means we may fail to get a gl context, we just require
*some* color depth.

11 years agoPick the first rgba visual, not the last
Alexander Larsson [Tue, 28 Oct 2014 17:27:41 +0000 (18:27 +0100)]
Pick the first rgba visual, not the last

The visuals are typically sorted by some sort of "most useful first"
order. And picking the last one is likely to give us the weirdest
matching glx visual.

11 years agoGdkGLContextX11: Ensure we get the fbconfig with the exact same visual
Alexander Larsson [Tue, 28 Oct 2014 15:43:38 +0000 (16:43 +0100)]
GdkGLContextX11: Ensure we get the fbconfig with the exact same visual

We really want a gl context with exactly the same visual, or we will
get a badmatch later, which hits us on nvidia as per:

https://bugzilla.gnome.org/show_bug.cgi?id=738670

11 years agoDocument Wayland opacity handling
Matthias Clasen [Tue, 28 Oct 2014 14:48:49 +0000 (10:48 -0400)]
Document Wayland opacity handling

11 years agowayland: Make window opacity work
Matthias Clasen [Tue, 28 Oct 2014 14:28:23 +0000 (10:28 -0400)]
wayland: Make window opacity work

Under wayland, the compositor doesn't have a 'overall window alpha'
knob, we just need to add the alpha to the buffers we send.
Client-side alpha, if you want to call it that.

Implement this by reusing the existing alpha support for non-toplevel
widgets. As a side-effect of the implementation, windows with RGBA
visual under X will now also use per-pixel alpha, instead of
overall alpha.

11 years agoBump atk dep
Matthias Clasen [Tue, 28 Oct 2014 12:08:49 +0000 (08:08 -0400)]
Bump atk dep

Needed for ATK_STATE_HAS_TOOLTIP.

11 years agoInspector: Make picking work without a grab
Matthias Clasen [Tue, 28 Oct 2014 11:04:23 +0000 (07:04 -0400)]
Inspector: Make picking work without a grab

Turns out Weston takes an X grab while delivering button events.
Thus, trying to take a grab in response to a button press is
futile.

11 years agowayland: Don't use the default display
Jasper St. Pierre [Tue, 28 Oct 2014 04:44:48 +0000 (21:44 -0700)]
wayland: Don't use the default display

Pass a display in so that multi-display technology works.

11 years agogdkevents: Use the correct display to copy event data
Jasper St. Pierre [Tue, 28 Oct 2014 05:29:29 +0000 (22:29 -0700)]
gdkevents: Use the correct display to copy event data

11 years agogdkdisplay: Provide a default event_data_copy / event_data_free
Jasper St. Pierre [Tue, 28 Oct 2014 04:47:58 +0000 (21:47 -0700)]
gdkdisplay: Provide a default event_data_copy / event_data_free

Every single implementation but Quartz is a no-op for this, so just
provide it once rather than in every backend.

11 years agogtk-demo: Drop uses of gdk_cursor_new()
Matthias Clasen [Tue, 28 Oct 2014 04:56:46 +0000 (00:56 -0400)]
gtk-demo: Drop uses of gdk_cursor_new()

Use gdk_cursor_new_for_display() instead.

11 years agoAdd another multi-device invariant
Matthias Clasen [Tue, 28 Oct 2014 04:54:39 +0000 (00:54 -0400)]
Add another multi-device invariant

The device and window passed to gdk_device_grab() must be
on the same display, or things are unlikely to work.
Document and assert this.

11 years agoDrop an unused variable
Matthias Clasen [Tue, 28 Oct 2014 04:53:59 +0000 (00:53 -0400)]
Drop an unused variable

11 years agoDon't return GDK_GRAB_SUCCESS on failure
Matthias Clasen [Tue, 28 Oct 2014 04:51:32 +0000 (00:51 -0400)]
Don't return GDK_GRAB_SUCCESS on failure

That seems ... counterproductive.

11 years agoMention the 'same display' requirement in the docs too
Matthias Clasen [Tue, 28 Oct 2014 04:44:33 +0000 (00:44 -0400)]
Mention the 'same display' requirement in the docs too

11 years agoDeprecate gdk_cursor_new()
Matthias Clasen [Tue, 28 Oct 2014 04:38:59 +0000 (00:38 -0400)]
Deprecate gdk_cursor_new()

Too easy to introduce an unintended assumption about the display
being the default this way.

11 years agoGtkAboutDialog: Don't use gdk_cursor_new
Matthias Clasen [Tue, 28 Oct 2014 04:36:17 +0000 (00:36 -0400)]
GtkAboutDialog: Don't use gdk_cursor_new

gdk_cursor_new returns cursors for the default display, and
thus is not safe to use in code that may run on non-default
displays.

11 years agogtkwindow: Use gdk_cursor_new_for_display
Jasper St. Pierre [Tue, 28 Oct 2014 04:21:00 +0000 (21:21 -0700)]
gtkwindow: Use gdk_cursor_new_for_display

Otherwise, this crashes the inspector, since it now uses multi-display
technology, and on Wayland, resources like the cursor are client-private.

11 years agogdkwindow: Specify some invariants for cursors
Jasper St. Pierre [Tue, 28 Oct 2014 04:18:15 +0000 (21:18 -0700)]
gdkwindow: Specify some invariants for cursors

Cursors should not be on a different display than their window /
device, as that would break Wayland.

11 years agoUpdate for 3.15.1
Matthias Clasen [Mon, 27 Oct 2014 23:12:03 +0000 (19:12 -0400)]
Update for 3.15.1

11 years agoUpdate expected results of a11y tests
Matthias Clasen [Mon, 27 Oct 2014 23:31:04 +0000 (19:31 -0400)]
Update expected results of a11y tests

The new has-tooltip state is showing up in a number of places,
as expected.

11 years agox11: Scale the frame extents as well
Jasper St. Pierre [Mon, 27 Oct 2014 23:54:33 +0000 (16:54 -0700)]
x11: Scale the frame extents as well

11 years agogtk3-demo: Add a frame to the sidebar
Matthias Clasen [Mon, 27 Oct 2014 21:13:36 +0000 (17:13 -0400)]
gtk3-demo: Add a frame to the sidebar

With overlay scrollbars, there's no visible separation between
the sidebar and the content otherwise.

11 years agoopengl: Use GL_TEXTURE_2D rather than GL_TEXTURE_RECTANGLE_ARB when possible
Alexander Larsson [Mon, 27 Oct 2014 20:15:37 +0000 (21:15 +0100)]
opengl: Use GL_TEXTURE_2D rather than GL_TEXTURE_RECTANGLE_ARB when possible

This is more standard, and most driver support non-power-of-2 TEXTURE_2D
these days. We fall back for ancient drivers.

11 years agoopengl: Use proper blend function for premultiplied alpha
Alexander Larsson [Mon, 27 Oct 2014 20:13:28 +0000 (21:13 +0100)]
opengl: Use proper blend function for premultiplied alpha

11 years agogdkglcontext: Track whether to use GL_TEXTURE_2D or GL_TEXTURE_RECTANGL_ARB
Alexander Larsson [Mon, 27 Oct 2014 20:12:40 +0000 (21:12 +0100)]
gdkglcontext: Track whether to use GL_TEXTURE_2D or GL_TEXTURE_RECTANGL_ARB

11 years agocairoblur: Fix the blur again once more
Jasper St. Pierre [Mon, 27 Oct 2014 17:18:37 +0000 (10:18 -0700)]
cairoblur: Fix the blur again once more

The differences between the mutter and GTK+ code are subtle, but it
turns out that _gtk_cairo_blur_compute_pixels actually returns the
shadow *spread*. Since we use a triple box blur, the constant was
multiplied by 1.5 to approximate three chained box blurs. Split this
out and use the correct value for the lobe width.

11 years agocairoblur: Fix the blur code
Jasper St. Pierre [Mon, 27 Oct 2014 17:05:35 +0000 (10:05 -0700)]
cairoblur: Fix the blur code

We weren't passing in the right "d" value, which was causing the blur to
behave incorrectly, especially in the case of 1px blurs, which would
cause no blurs at all.

The blur should now match the web.

11 years agoRename gdk_gl_context_flush_buffer to gdk_gl_context_end_frame
Alexander Larsson [Mon, 27 Oct 2014 15:33:37 +0000 (16:33 +0100)]
Rename gdk_gl_context_flush_buffer to gdk_gl_context_end_frame

This makes a lot more sense.

11 years agoIndentation fix
Matthias Clasen [Mon, 27 Oct 2014 11:19:50 +0000 (07:19 -0400)]
Indentation fix

11 years agopopover menus: Take iconic into account
Sebastien Lafargue [Sat, 18 Oct 2014 09:19:26 +0000 (11:19 +0200)]
popover menus: Take iconic into account

We don't want separators in both side of an iconic section
and use a 10px margin to separate two iconic sections.

Separators are also updated in case of dynamic insertion
( often used with menu items for plugins )

https://bugzilla.gnome.org/show_bug.cgi?id=738650

11 years agoIgnore gdk-pixbuf deprecations
Matthias Clasen [Mon, 27 Oct 2014 11:05:22 +0000 (07:05 -0400)]
Ignore gdk-pixbuf deprecations

11 years agotestlevelbar: fix CSS to be aligned with documentation
Cosimo Cecchi [Fri, 24 Oct 2014 22:26:31 +0000 (15:26 -0700)]
testlevelbar: fix CSS to be aligned with documentation

https://bugzilla.gnome.org/show_bug.cgi?id=707695

11 years agolevelbar: don't use the current value style class for empty blocks
Cosimo Cecchi [Fri, 24 Oct 2014 22:25:36 +0000 (15:25 -0700)]
levelbar: don't use the current value style class for empty blocks

We want to be able to style the empty blocks independently of all the
offset styles, so remove the current style class when painting an empty
block.

https://bugzilla.gnome.org/show_bug.cgi?id=707695

11 years agotestlevelbar: don't segfault when quitting testlevelbar
Cosimo Cecchi [Fri, 24 Oct 2014 21:53:26 +0000 (14:53 -0700)]
testlevelbar: don't segfault when quitting testlevelbar

Quit the mainloop when the window is closed.

https://bugzilla.gnome.org/show_bug.cgi?id=707695

11 years agoquartz: Move the FullscreenSavedGeometry definition earlier
Matthias Clasen [Mon, 27 Oct 2014 10:49:46 +0000 (06:49 -0400)]
quartz: Move the FullscreenSavedGeometry definition earlier

Move the FullscreenSavedGeometry before the first (conditional)
use, to fix the build on OS X 10.6.

https://bugzilla.gnome.org/show_bug.cgi?id=737561

11 years agoquartz: fix build on 10.6 and below
Marcus Karlsson [Sun, 26 Oct 2014 11:26:48 +0000 (12:26 +0100)]
quartz: fix build on 10.6 and below

It is not possible to successfully build GTK+ on OS X 10.6 and below
since NSFullScreenWindowMask is only available starting with 10.7. Add
ifdef guards around setStyleMask: in order to allow it to build on
earlier OS X releases.

https://bugzilla.gnome.org/show_bug.cgi?id=737561

11 years agoReturn correct font from gtk_font_chooser_widget_find_font
Christophe Fergeau [Thu, 23 Oct 2014 19:13:29 +0000 (21:13 +0200)]
Return correct font from gtk_font_chooser_widget_find_font

Commit 30a1c4ab fixed several memleaks including one in
gtk_font_chooser_widget_find_font.

However, the fix causes one extra call to gtk_tree_model_iter_next()
after finding the font we look for (ie pango_font_description_equal
returns TRUE): the 'increment' part of the for loop
(gtk_tree_model_iter_next) is run before the 'exit condition' of the for
loop is evaluated.

This commit reverts this part of commit 30a1c4ab and adds an extra
call to pango_font_description_free in order to fix the leak.

https://bugzilla.gnome.org/show_bug.cgi?id=739111

11 years agofontchooserwidget: Don't invalidate priv->font_iter in load_fonts
Christophe Fergeau [Thu, 23 Oct 2014 21:30:35 +0000 (23:30 +0200)]
fontchooserwidget: Don't invalidate priv->font_iter in load_fonts

When using GtkFontChooserButton, the same GtkFontChooserWidget can be
hidden and shown multiple times. When doing that, the font that was
chosen the previous time should be the selected one in the
GtkFontChooserWidget, however this does not work as expected and a
somehow 'random' font gets selected (or none) instead.

Every time the font chooser widget is shown, its style will be updated,
causing gtk_font_chooser_widget_style_updated and then
gtk_font_chooser_widget_load_fonts to be called.

gtk_font_chooser_widget_load_fonts starts by clearing the GtkListStore
listing the available fonts, repopulates it, and then makes sure the
current font is selected.

However, this does not work as expected, as during the call to
gtk_list_store_clear, the cursor_changed_cb will be invoked multiple
times when the GtkTreeView cursor gets moved when the line where the
cursor currently is gets removed. This will cause the 'current font'
state (priv->font_desc) to be unexpectedly modified, and when
gtk_font_chooser_widget_load_fonts tries to reposition the cursor to the
'current font', we won't get the expect result.

This commit avoids that by making sure cursor_changed_cb does not get
called when we call gtk_list_store_clear in
gtk_font_chooser_widget_load_fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=739111

11 years agoFix an out-of-bounds access in MyEnhancedXkbTranslateKeyCode
Matthias Clasen [Mon, 27 Oct 2014 01:48:59 +0000 (21:48 -0400)]
Fix an out-of-bounds access in MyEnhancedXkbTranslateKeyCode

Commits 314b6abbe8d8daae and eb9223c008ccf1c2faab were ignoring
the fact that the code where found is set to 1 was modifying
col - which was an ok thing to do when that part of the code
was still breaking out of the loop, but it is no longer doing
that (since 2003 !). Fix things up by storing the final col
value in a separate variable and using that after the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=738886

11 years agoTest h/vhomogenenous in teststack
Matthias Clasen [Sun, 26 Oct 2014 19:07:26 +0000 (15:07 -0400)]
Test h/vhomogenenous in teststack

Add separate checkboxes for hhomogeneous and vhomogeneous.

11 years agoUse GtkStack:vhomogeneous for popover menus
Matthias Clasen [Sun, 26 Oct 2014 19:03:58 +0000 (15:03 -0400)]
Use GtkStack:vhomogeneous for popover menus

This allows us to get rid of a size group.

11 years agoGtkStack: split homogeneous
Matthias Clasen [Sun, 26 Oct 2014 18:59:21 +0000 (14:59 -0400)]
GtkStack: split homogeneous

Split homogeneous into separate hhomogeneous and vhomogeneous
properties. vhomogeneous is what we want for popover menus.

11 years agopopover: Use the right area for drawing the background
Timm Bäder [Sun, 26 Oct 2014 14:21:06 +0000 (15:21 +0100)]
popover: Use the right area for drawing the background

The border shouldn't be subtracted.

11 years agoGtkBox: Fix self-assignment for center widget
Matthias Clasen [Sun, 26 Oct 2014 00:27:18 +0000 (20:27 -0400)]
GtkBox: Fix self-assignment for center widget

This is happening when glade is loading ui files containing
center widgets.

11 years agoUpdated Czech translation
Marek Černocký [Sat, 25 Oct 2014 22:35:56 +0000 (00:35 +0200)]
Updated Czech translation

11 years agoUpdated Czech translation
Marek Černocký [Sat, 25 Oct 2014 22:35:50 +0000 (00:35 +0200)]
Updated Czech translation

11 years agoGtkPlacesSidebar: Don't crash on dnd
Matthias Clasen [Sat, 25 Oct 2014 19:55:54 +0000 (15:55 -0400)]
GtkPlacesSidebar: Don't crash on dnd

gtk_get_current_event() can return NULL. Don't crash if it does.

https://bugzilla.gnome.org/show_bug.cgi?id=739150

11 years agoRevert "Inspector backend hack"
Matthias Clasen [Sat, 25 Oct 2014 17:58:29 +0000 (13:58 -0400)]
Revert "Inspector backend hack"

This reverts commit f88a5dc8c78e6530baeebb6cba75fe3061926052.

Didn't mean to push this.

11 years agoGtkSpinButton: Set the screen on the panel contexts
Matthias Clasen [Sat, 25 Oct 2014 17:31:57 +0000 (13:31 -0400)]
GtkSpinButton: Set the screen on the panel contexts

Failure to do so results in custom styling leaking through in
the inspector. This is pretty obvious, now that the inspector
is using a separate display connection and is generally isolated
from style changes.

11 years agoInspector backend hack
Matthias Clasen [Fri, 24 Oct 2014 22:00:19 +0000 (18:00 -0400)]
Inspector backend hack

11 years agoBroadway: Remove display assumptions
Matthias Clasen [Sat, 25 Oct 2014 14:31:31 +0000 (10:31 -0400)]
Broadway: Remove display assumptions

In various places, the broadway backend was just using
the default display and assumed that it is the broadway
display. That may not be the case in a multi-backend world,
so instead iterate over all displays and use the first
broadway display - still not perfect, but enough to survive
for now.

11 years agoinspector: Plug a memory leak
Matthias Clasen [Sat, 25 Oct 2014 14:00:57 +0000 (10:00 -0400)]
inspector: Plug a memory leak

11 years agoinspector: Add style classes to the object list
Matthias Clasen [Sat, 25 Oct 2014 14:00:04 +0000 (10:00 -0400)]
inspector: Add style classes to the object list

We have a lot of space here now, so show some
useful information.

11 years agoFix a mixup in popover realization
Matthias Clasen [Sat, 25 Oct 2014 03:36:35 +0000 (23:36 -0400)]
Fix a mixup in popover realization

When the window is on a non-default screen, popover_realize
ended up passing a visual and a parent_window from different
screens into gdk_window_new, which doesn't work. Fix it by
using the visual of the parent window.

11 years agoinspector: Improve details buttons
Matthias Clasen [Sat, 25 Oct 2014 01:52:23 +0000 (21:52 -0400)]
inspector: Improve details buttons

Ensure that the details buttons are only sensitive when
we actually have details to show.

11 years agoinspector: Improve tab switching
Matthias Clasen [Sat, 25 Oct 2014 01:14:16 +0000 (21:14 -0400)]
inspector: Improve tab switching

Switch the object and resource trees away from activate-on-single-click
and add a 'view details' button.

11 years agoX11: Don't assume all displays are X11 displays
Matthias Clasen [Fri, 24 Oct 2014 22:38:15 +0000 (18:38 -0400)]
X11: Don't assume all displays are X11 displays

When iterating over the list of displays gotten from the
display manager, we have to check if what we got is actually
an X11 display.

11 years agoProperly update the style cascade on screen change
Matthias Clasen [Fri, 24 Oct 2014 20:23:07 +0000 (16:23 -0400)]
Properly update the style cascade on screen change

GtkStyleContext was not properly handling the style cascade when
setting a screen, causing the inspector global CSS to affect the
inspector window, even though the inspector is using a different
screen now.

11 years agoFix the build
Matthias Clasen [Fri, 24 Oct 2014 20:12:33 +0000 (16:12 -0400)]
Fix the build

Some forgotten include path adjustments.

11 years agoinspector: Use a separate display connection
Matthias Clasen [Fri, 24 Oct 2014 19:55:31 +0000 (15:55 -0400)]
inspector: Use a separate display connection

This helps isolate the inspector from some of the changes that
it can trigger. To specify a different display, set
GTK_INSPECTOR_DISPLAY to the name of the display to use for
the inspector window. If no display is specified, GTK+ will
use a separate connection to the default display.